package com.example.demo10.controller;

import com.example.demo10.mapper.PrpdcompanyMapper;
import com.example.demo10.pojo.Prpdcompany;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

//import org.mybatis.logging.Logger;
//import org.mybatis.logging.LoggerFactory;

/* 类注解 */
@Api(value = "测试接口", tags = "用户管理相关的接口", description = "用户测试接口")
@RestController
public class MyController {
    @Autowired
    PrpdcompanyMapper prpdcompanyMapper;

    /* 方法注解 */
    @ApiOperation(value = "根据id获取用户信息", notes = "根据id查询用户信息")
    @RequestMapping("/prpdcompany")
    public String prpdcompany(){
        Logger logger = LoggerFactory.getLogger(MyController.class);

        //PrpdcompanyServicesImpl p1 = new PrpdcompanyServicesImpl();
        Prpdcompany p1 = prpdcompanyMapper.queryAll();

        logger.info("MyController /prpdcompany return begin! ------------------------------------------------------------------------" );

        return p1.toString();

    }

}
